

import Vuex from "vuex";
import Vue from "vue";

const actions = {
    jia(ctx,v){
        console.log("actions jia called",ctx,v);
        ctx.commit("JIA",v);
    }
};

const mutations= {
    JIA(state,v){
        console.log("mutations JIA called",state,v);
        state.sum += 1;
    }
};

const state = {
    sum:0
};


Vue.use(Vuex);

export default new Vuex.Store({
    actions,
    mutations,
    state
});



